<!--
  CSS selector for site.
  Chirpy v2.3
  https://github.com/cotes2020/jekyll-theme-chirpy
  © 2020 Cotes Chung
  MIT Licensed
-->

{% if page.layout == 'home' %}
  <link rel="preload" href="{{ '/assets/css/home.css' | relative_url }}" as="style">
  <link rel="stylesheet" href="{{ '/assets/css/home.css' | relative_url }}">

{% elsif page.layout == 'page' %}

  {% if page.type == 'categories' %}

    <link rel="preload" href="{{ '/assets/css/categories.css' | relative_url }}" as="style">
    <link rel="stylesheet" href="{{ '/assets/css/categories.css' | relative_url }}">

  {% elsif page.type == 'tags' %}

    <link rel="preload" href="{{ '/assets/css/tags.css' | relative_url }}" as="style">
    <link rel="stylesheet" href="{{ '/assets/css/tags.css' | relative_url }}">

  {% elsif page.type == 'archives' %}

    <link rel="preload" href="{{ '/assets/css/archives.css' | relative_url }}" as="style">
    <link rel="stylesheet" href="{{ '/assets/css/archives.css' | relative_url }}">

  {% else %}

    <link rel="preload" href="{{ '/assets/css/page.css' | relative_url }}" as="style">
    <link rel="stylesheet" href="{{ '/assets/css/page.css' | relative_url }}">

  {% endif %}

{% elsif page.layout == 'category' or page.layout == 'tag' %}

  <link rel="preload" href="{{ '/assets/css/category-tag.css' | relative_url }}" as="style">
  <link rel="stylesheet" href="{{ '/assets/css/category-tag.css' | relative_url }}">

{% elsif page.layout == 'post' %}

  <link rel="preload" as="style" href="{{ '/assets/css/post.css' | relative_url }}">
  <link rel="stylesheet" href="{{ '/assets/css/post.css' | relative_url }}">

  {% if site.toc and page.toc %}

    <link rel="preload" as="style" href="{{ '/assets/css/lib/bootstrap-toc.min.css' | relative_url }}">
    <link rel="stylesheet" href="{{ '/assets/css/lib/bootstrap-toc.min.css' | relative_url }}" />

  {% endif %}

{% endif %}
